<extend name="Common/base" />
<block name="content">
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=SC1n3KjGW9rYZGs5tPqpE7dKQnwfcSU9"></script>

                <!-- content -->
                <div class="col-md-10">
				
					<div class="row">
						<div class="navbar navbar-default bootstrap-admin-navbar-thin">
							<ol class="breadcrumb bootstrap-admin-breadcrumb">
								<li>
									<a href="#">首页</a>
								</li>
								<li>
									<a href="#">抢购大厅</a>
								</li>
								<li class="active">我要抢单</li>
							</ol>
						</div>
					</div>
                    <div class="row">
                        <div class="panel panel-default bootstrap-admin-no-table-panel">
                            <div class="panel-heading">
                                <div class="text-muted bootstrap-admin-box-title">需求详情</div>
                            </div>
                            <div class="bootstrap-admin-no-table-panel-content bootstrap-admin-panel-content collapse in">
                           
                                    <fieldset>
                                        <legend>{$info['name']}</legend>
                                        <div class="form-group">
                                            <label class="col-lg-2 control-label" for="focusedInput">需求名称</label>
                                            <div class="col-lg-10">
                                                 <label>
                                                  {$info['name']}
                                                </label>
                                            </div>
                                        </div>
										<div class="form-group">
                                            <label class="col-lg-2 control-label" for="focusedInput">图片</label>
                                            <div class="col-lg-10">
                                                 <label>
                                                  <img src="{$info['thumb']}" />
                                                </label>
                                            </div>
                                        </div>
										<div class="form-group">
                                            <label class="col-lg-2 control-label" for="optionsCheckbox2">联系人</label>
                                            <div class="col-lg-10">
                                                <label>
                                                   {$info['contacts']}
                                                </label>
                                            </div>
                                        </div>
                                        <div class="form-group ">
                                            <label class="col-lg-2 control-label" for="focusedInput">电话</label>
                                            <div class="col-lg-10">
                                                <label>
                                                   {$info['mobile']}
                                                </label>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-lg-2 control-label" for="focusedInput">重量</label>
                                            <div class="col-lg-10">
                                                  <label>
                                                   {$info['weight']}
                                                </label>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-lg-2 control-label" for="focusedInput">体积</label>
                                            <div class="col-lg-10">
                                                 <label>
                                                   {$info['volume']}
                                                 </label> 
											</div>
                                        </div>
										
                                        <div class="form-group">
                                            <label class="col-lg-2 control-label" for="focusedInput">是否托管</label>
                                            <div class="col-lg-10">
                                                <label>
                                                  <?php if($info['type'] == 1):?> 
												  是
												  <?php else:?>
												  否
												  <?php endif;?>
                                                </label>
                                            </div>
                                        </div>
                                        <div class="form-group ">
                                            <label class="col-lg-2 control-label" for="focusedInput">需求价格</label>
                                            <div class="col-lg-10">
                                                <label>
                                                   {$info['price']}
                                                </label>
                                            </div>
                                        </div>
										<div class="form-group ">
                                            <label class="col-lg-2 control-label" for="focusedInput">需求发货时间</label>
                                            <div class="col-lg-10">
                                                <label>
                                                   {:date('Y-m-d H:i:s',$info['send_start_time'])}
                                                </label>
                                            </div>
                                        </div>
										<div class="form-group ">
                                            <label class="col-lg-2 control-label" for="focusedInput">截止送达时间</label>
                                            <div class="col-lg-10">
                                                <label>
                                                    {:date('Y-m-d H:i:s',$info['send_end_time'])}
                                                </label>
                                            </div>
                                        </div>
										<div class="form-group ">
                                            <label class="col-lg-2 control-label" for="focusedInput">需求结束时间</label>
                                            <div class="col-lg-10">
                                                <label>
                                                   {:date('Y-m-d H:i:s',$info['end_time'])}
                                                </label>
                                            </div>
                                        </div>
                                        <div class="form-group ">
                                            <label class="col-lg-2 control-label" for="focusedInput">配送地址</label>
                                            <div class="col-lg-10">
                                                 <label>
                                                   {$info['province_name']}{$info['city_name']}{$info['area_name']}{$info['adress']}
                                                </label>
                                            </div>
                                        </div>
										<div class="form-group">
											<label class="col-lg-2 control-label">地图</label>
											<div class="col-lg-9">
												<div style="width:100%; height:300px; border:1px solid #ccc;" id="allmap"></div>
											</div>
										</div>
						
											<input class="form-control" type="hidden"    value="{$info['lng']}" id="lng" placeholder="经度" type="text">
										
											<input class="form-control" type="hidden"    value="{$info['lat']}" id="lat" placeholder="纬度" type="text">
                                       
                                    </fieldset>
                              
                            </div>
							<div class="bootstrap-admin-no-table-panel-content bootstrap-admin-panel-content collapse in">
								<form class="form-horizontal" action=""  method="post" >
									<fieldset>
										<legend>历史报价</legend>
											<table class="table table-striped">
												<thead>
													<tr>
														<th>物流商</th>
														<th>价格</th>
														<th>报价时间</th>
													
													</tr>
												</thead>
												<tbody>
													<volist name="list" id="val">
													<tr>
														<td>{$val['company_name']}</td>
														<td>{$val['price']}</td>
														<td>{:date('Y-m-d H:i:s',$val['create_time'])}</td>
													</tr>
													</volist>
												</tbody>
											</table>
									   
									</fieldset>
								</form>
							</div>
							<?php if($info['is_true']!= 1):?>
							<div class="bootstrap-admin-no-table-panel-content bootstrap-admin-panel-content collapse in">
								<form class="form-horizontal" action=""  method="post" >
									<fieldset>
										<legend>我的报价</legend>
										<div class="form-group">
                                            <label class="col-lg-2 control-label" for="typeahead">我的价格 </label>
                                            <div class="col-lg-10">
                                                <input type="number" class="form-control col-md-6" name="price" id="typeahead" autocomplete="off" data-provide="typeahead" data-items="4" data-source='["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]'>
                                             
                                            </div>
                                        </div>
                                      
										<div class="form-group">
                                            <label class="col-lg-2 control-label" for="textarea-wysihtml5">备注</label>
                                            <div class="col-lg-10">
                                                <textarea id="textarea-wysihtml5" class="form-control textarea-wysihtml5" name="brief" placeholder="物流备注" style="width: 100%; height: 200px"></textarea>
                                            </div>
                                        </div>
									
								 
										
										<input type="hidden" name="need_id" value="{$info['id']}" >
									  
										<button type="submit" class="btn btn-primary">我要报价</button>
									   
									</fieldset>
								</form>
							</div>
							<?php endif;?>
                        </div>
                    </div>
					
				

                </div>   
            </div>

     </block>
<block name="script">
	<script type="text/javascript">
		$(function() {
			// Easy pie charts
			$('.easyPieChart').easyPieChart({animate: 1000});
		});
	</script>
	<script type="text/javascript">
		var map = new BMap.Map("allmap");
		$(function(){
			var lng = $("#lng").val();
			var lat = $("#lat").val();
			var point = new BMap.Point(lng,lat);
			map.centerAndZoom(point,11);
			bImg(lng,lat);
		});
		setTimeout(function(){
			map.setZoom(14);   
		}, 2000);  //2秒后放大到14级

		map.enableScrollWheelZoom(false); 
	
		function bImg(lng,lat){
			var point = new BMap.Point(lng,lat);
			map.clearOverlays();
			var marker = new BMap.Marker(point); 
			map.addOverlay(marker);  
			marker.setAnimation(BMAP_ANIMATION_BOUNCE);
		}
		
	</script>
</block>

